<template>
		<view class="goods_list">
			<view class="goods_item" v-for="(item,index) in goods" :key="index">
				<image :src="item.goods_big_logo"></image>
				<view class="price">
					<text>￥{{item.goods_price}}</text>
					<text>￥{{item.goods_price + 299}}</text>
				</view>
				<view class="name">
					{{item.goods_name}}
				</view>
			</view>
		</view>
</template>

<script>
	export default {
		// 通过props 接收父组件传递过来的值
		props:['goods'],
		methods: {
			
		}
	}
</script>

<style lang="scss">
	.goods_list{
		margin: 0 15rpx;
		display: flex;
		flex-wrap: wrap; // 换行
		justify-content: space-between; // 两边对齐
		.goods_item{
			background: #FFFFFF;
			width: 355rpx;
			margin: 10rpx 0;
			padding: 15rpx;
			box-sizing: border-box; // 父盒子不继承
			image{
				width: 80%;
				height: 150px;
				display: block; // 转块级元素 然后再设置居中
				margin: 0 auto;
			}
			.price{
				color: $shop-color;
				font-size: 36rpx;
				margin: 8rpx 0;
				text:nth-child(2){ // nth-child(2) 第二个text标签
					color: #ccc;
					font-size: 28rpx;
					margin-left: 17rpx;
					text-decoration: line-through; // 中划线
				}
			}
			.name{
				font-size: 28rpx;
				line-height: 50rpx;
				padding-top: 10rpx;
				padding-bottom: 15rpx;
			}
		}
	}
</style>
